﻿using com.guojin.mj.net.message.login;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class MsgItem : MonoBehaviour
{

    public Text name, id, gold;
    public Button yes, no;
    public int userid, Index;
    public string roomid;
    public void Set(DairiItem cl)
    {
        id.text = cl.Roomid;
        gold.text = cl.Score;
        name.text = cl.Name;
        userid = cl.Id;
        Index = cl.Index;
        roomid = cl.Roomid;
        yes.onClick.AddListener(delegate {
            MessageManager.GetInstance().Send7160(true, userid, Index, roomid);
            Destroy(this.gameObject);
        });
        no.onClick.AddListener(delegate {
            MessageManager.GetInstance().Send7160(false, userid, Index, roomid);
            Destroy(this.gameObject);
        });
    }
}
